package pailaidai.hc.com.mysvgdemo.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.CompoundButton;
import android.widget.RadioButton;

import pailaidai.hc.com.mysvgdemo.R;

/**
 * Created by Administrator on 2018/3/30.
 */

public class MyRadioButton extends android.support.v7.widget.AppCompatRadioButton implements CompoundButton.OnCheckedChangeListener{
    private String mValue;
    public MyRadioButton(Context context) {
        super(context);
    }

    public MyRadioButton(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public MyRadioButton(Context context, AttributeSet attrs) {
        super(context, attrs);
        TypedArray typedArray=context.obtainStyledAttributes(attrs, R.styleable.MyRadioButton);
        mValue=typedArray.getString(R.styleable.MyRadioButton_value);
        invalidate();
        typedArray.recycle();
        setOnCheckedChangeListener(this);
    }

    @Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

    }

    public String getmValue() {
        return mValue;
    }

    public void setmValue(String mValue) {
        this.mValue = mValue;
    }
}
